home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: Big and little endians
- Date: 16 Feb 96 00:04:20 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.824429060@rscernix>
- References: <4fuuqq$fpp@due.unit.no>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <4fuuqq$fpp@due.unit.no> Vidar Moe <vidarm@ibt.unit.no> writes:
-
- >What exactly is meant by the terms little-endians and
- >big-endians?
-
- A little-endian machine stores the least significant byte of an integer
- at the lowest address allocated to that integer and the most significant
- byte at the highest address allocated to that integer.
-
- A big-endian machine stores the most significant byte of an integer
- at the lowest address allocated to that integer and the least significant
- byte at the highest address allocated to that integer.
-
- All the intermediate bytes are stored in natural succession.
-
- The byte order of floating point values is usually also affected by the
- endianness (aka "byte sex") of the processor.
-
- Note that there are machines (not very frequent nowadays) which are
- neither big nor little-endian (e.g. PDP-11 WRT 32-bit integers).
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-